package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.NursingLevelDto;
import com.zzyl.entity.NursingLevel;
import com.zzyl.vo.NursingLevelVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingLevelMapper {

    void insert(NursingLevel nursingLevel);

    Page<NursingLevelVo> getByPage(String name, Integer status);

     NursingLevelVo getById(Integer id);

    void update(NursingLevel nursingLevel);

    @Delete("delete from nursing_level where id = #{id}")
    void delete(Integer id);

//    @Select("select * from nursing_level")
    List<NursingLevelVo> getAll();

    @Select("update nursing_level set status = #{status} where id = #{id}") /* 根据id修改启用、禁用状态 */
    void updateStatus(Integer id, Integer status);
}
